<%inherit file="/front/base/normalbase.html"/>
<%def name="center()">
<div class="row">
    <div class="span6">
    <div class="page-header">
        <h1>
            <a href="#sd">商家登陆</a>
        </h1>
    </div>
    %if error:
    <div class="alert alert-error">${error}</div>
    %endif
    <form class="form-horizontal" method="post" action="${request.url}">
        <fieldset>
            <div class="control-group">
                <label class="control-label" for="input01">帐号</label>
                <div class="controls">
                    <input type="text" class="input-xlarge" name="name">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="input01">密码</label>
                <div class="controls">
                    <input type="password" class="input-xlarge" name="password">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="input01">验证码</label>
                <div class="controls">
                    <input type="text" class="input-small" name="captcha">
                    <p class="help-block"><img id="captcha" src="/captcha"/>&nbsp;<a id="changeCaptcha" href="#">换一个</a></p>
                </div>
            </div>
            <div class="form-actions">
                <button class="btn btn-primary" type="submit">登陆</button>
                <button class="btn">申请入驻</button>
            </div>
        </fieldset>
    </form>
    </div>
</div>
</%def>

<%def name="script()">
<script type="text/javascript">
    $(document).ready(function(){
        $('#changeCaptcha').click(function(){
            $('#captcha').attr('src', '/captcha?' + Math.random()*1000);
        })
    })
</script>
</%def>
